import React, {Component} from 'react'
import {
    Image,
    StyleSheet, Text, TouchableOpacity,
    View, Dimensions
} from 'react-native'

let {height, width} = Dimensions.get('window');
export default class shopgridviewpageitem extends Component {
    constructor(props) {
        super(props)
        this.state = {}
    }

    render() {
        return (
            <TouchableOpacity style={styles.container}
                              onPress={this.props.onPress}>
                <Image source={this.props.icon} resizeMode='contain' style={styles.icon}/>
                <Text>
                    {this.props.title}
                </Text>
            </TouchableOpacity>
        );
    }
}
const styles = StyleSheet.create({
    container: {
        justifyContent: 'center',
        alignItems: 'center',
        width: width / 5,
        height: width / 5,
        padding:5,
    },
    icon: {
        width: width / 9,
        height: width / 9,
        margin: 5,
    }
});
module.exports = shopgridviewpageitem